taskNr = 80;
machineNr = 20;
minExecTime = 5;
maxExecTime = 20;


mTab = zeros(machineNr,machineNr,taskNr);

for i=1:taskNr
    taskMatrix = zeros(machineNr,machineNr);
    machineNrVector = zeros(1,machineNr);
    execOrder = zeros(1,machineNr);
   
    for j=1:machineNr
        machineNrVector(j) = j;
    end
    
    for j=1:machineNr
        pickMachine = randi([1,length(machineNrVector)]);
        execOrder(j) = machineNrVector(pickMachine);
        machineNrVector(pickMachine) = [];
    end
    
    for j=1:machineNr
        taskMatrix(execOrder(j),j) = randi([minExecTime,maxExecTime]);
    end
 
    mTab(:,:,i) = taskMatrix;        
end

clearvars taskNr machineNr minExecTime maxExecTime taskMatrix machineNrVector execOrder i j pickMachine